const {
  req
} = require('../../utils/requests')
Page({

  /**
   * 页面的初始数据
   */
  data: {
    rankList: [], //赛程数据
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.init()
  },
  init() {
    let self = this
    // 获取赛程
    req('https://matchweb.sports.qq.com/kbs/rank?columnId=100000&tabType=1&from=kbsh5&reqSrc=').then(res => {
      console.log(res.data.data);
      self.setData({
        rankList: res.data.data
      })
    })
  },
  // 球队详情
  gotoTeam(e) {
    let playid = e.currentTarget.dataset.teamid
    wx.navigateTo({
      url: '../team/team?playid=' + playid,
    })
  },


})